package com.dearbinge.data.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.dearbinge.data.pojo.showField.ShowField;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface ShowFieldMapper {
    Integer update(ShowField showField);

    Integer insert(ShowField showField);

    Integer delete(Integer id);

    ShowField getById(Integer id);

    /*List<ShowField> getByPage(@Param("commodityId") String commodityId, @Param("thumbsType") Integer thumbsType, @Param("minLat") Double minLat,@Param("minLng") Double minLng,@Param("maxLat") Double maxLat,@Param("maxLng") Double maxLng,@Param("lon") Double lon,@Param("lat") Double lat,@Param("page") Page page);
*/
    Integer count(@Param("userId") String userId,@Param("commodityId") String commodityId, @Param("thumbsType") Integer thumbsType, @Param("minLat") Double minLat, @Param("minLng") Double minLng, @Param("maxLat") Double maxLat, @Param("maxLng") Double maxLng, @Param("lon") Double lon, @Param("lat") Double lat, @Param("id") Integer id);

    List<Map<String,Object>> getByPage(@Param("userId") String userId,@Param("commodityId") String commodityId, @Param("thumbsType") Integer thumbsType, @Param("minLat") Double minLat,@Param("minLng") Double minLng,@Param("maxLat") Double maxLat,@Param("maxLng") Double maxLng,@Param("lon") Double lon,@Param("lat") Double lat,@Param("id") Integer id,Page page);

    void updateByUserId(ShowField showField);
}
